package tcm.com.gistone.api.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tcm.com.gistone.database.config.GetBySqlMapper;

import java.util.List;
import java.util.Map;

/**
 * Created by wangfan on 2017/9/3.
 */
@Service
public class SectionService {

    @Autowired
    private GetBySqlMapper getBySqlMapper;
    public  String getImgUrlById(long id){
        System.out.println("------"+id);
        String sql = "select * from tb_directory   where section_id  ="+id;
        System.out.println(getBySqlMapper.findRecords(sql).get(0).get("image_url"));
        return getBySqlMapper.findRecords(sql).get(0).get("image_url")==null?"":getBySqlMapper.findRecords(sql).get(0).get("image_url").toString();
    }




    }
